stulist = [
    {'name':'wqp','mima':'62778585','money':'50000'},
    {'name':'lmy','mima':'1015703593','money':'5000'},
    {'name':'cjl','mima':'18379139960','money':'1000'}
    ]
def showstu(stulist):
    if len(stulist)==0:
        print('========????============')
        return
    print('-'*50)
    name = input('请输入账户：')
    mima = int(input('请输入密码：'))
    for i in range(len(stulist)):
        if stulist[i]['name'] == name and int(stulist[i]['mima']) == mima:
            print('登录成功')
            while True:
                print('{0:1} {1:15} {2:15} {3:15} {4:15}'.format(' ', '1.查询余额','2.取款','3.存款','4.重新登录账号'))
                print('=' * 40)
                key = input('请输入对应的选择：')
                if key == '1':
                    for i in range(len(stulist)):
                        if stulist[i]['name'] == name:
                            print(stulist[i]['money'])
                            input('任意键继续:')
                elif key == '2':
                    for i in range(len(stulist)):
                        if stulist[i]['name'] == name:
                            q1 = int(input('请输入要取走的款项：'))
                            q2 = int(stulist[i]['money'])
                            q3 = stulist[i]['money']= q2-q1
                            print('目前款项：',q3)
                            input('按任意键继续：')
                elif key == '3':
                    for i in range(len(stulist)):
                        if stulist[i]['name'] == name:
                            j1 = int(input('请输入要存入的款项：'))
                            j2 = int(stulist[i]['money'])
                            j3 = stulist[i]=j2+j1
                            print('目前款项：', j3)
                            input('按任意键继续：')
                elif key == '4':
                    showstu(stulist)
                else:
                    print('无效操作')
                    print('按任意键继续：')
    else:
         print('账户或密码输入错误')
while True:
    print('='*12,'银行登录系统','='*12)
    print('{0:1} {1:15} {2:15}'.format(' ','1.登录账号','2.退出系统'))
    print('='*40)
    key = input('请输入对应的选择：')
    if key == '1':
        print('='*12,'登录账户','='*12)
        showstu(stulist)
    elif key == '2':
        print('='*12,'退出系统','='*12)
        break
    else:
        print('='*5,'无效操作','='*5)
        input('按任意键继续：')